import {request} from '@/utils/request'
export function getRoleList(params) {
    return request({
        url: '/api/fizz-manager/blade-system/role/list',
        method: 'get',
        params
    })
}
export function getParentTree() {
    return request({
        url: 'api/fizz-manager/blade-system/role/tree',
        method: 'get',
    })
}
export function saveRole(data) {
    return request({
        url: 'api/fizz-manager/blade-system/role/submit',
        method: 'post',
        data
    })
}
export function getGrantTree() {
    return request({
        url: 'api/fizz-manager/blade-system/menu/grant-tree',
        method: 'get',
    })
}
export function getTreeKeys(roleId) {
    return request({
        url: 'api/fizz-manager/blade-system/menu//role-tree-keys?roleIds='+roleId,
        method: 'get',
    })
}

// 删除
export function delRole(ids) {
    return request({
        url: 'api/fizz-manager/blade-system/role/remove?ids='+ids,
        method: 'post',
    })
}
// 保存权限设置
export function savePower(data) {
    return request({
        url: 'api/fizz-manager/blade-system/role/grant',
        method: 'post',
        data
    })
}

